/*
 * @Descripttion: 
 * @version: 
 * @@Company: None
 * @Author: 孤鹜
 * @Date: 2022-02-18 08:55:42
 * @LastEditors: 孤鹜
 * @LastEditTime: 2022-02-27 21:48:39
 */
import { createRouter, createWebHashHistory } from 'vue-router'
import Examine from '../views/Examine.vue'
import Home from '../views/Home.vue'
const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      title: '校园社区后台管理系统首页'
    }
  },
  {
    path: '/Examine',
    name: 'Examine',
    component: Examine,
    meta: {
      title: '审核区'
    }
  },
  {
    path: '/detail',
    meta: {
      title: '详情页'
    },
    component: () => import('../views/Details.vue')
  },
  {
    path: '/test',
    meta: {
      title: '测试'
    },
    component: () => import('../components/posts.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

router.afterEach((to, from)=>{
  document.title = to.meta.title || '校园社区后台管理系统首页'
})

export default router
